package com.ifengxue.ioc.bean;

import com.ifengxue.ioc.annotation.Scope;

public class BeanDefinition {
    private final Class<?> originalClass;
    private final Scope.ScopeType scopeType;
    private final BeanFactory beanFactory;
    private volatile Object beanInstance;

    /**
     * @param originalClass 原始的class
     * @param scopeType 作用域
     */
    public BeanDefinition(Class<?> originalClass, Scope.ScopeType scopeType, BeanFactory beanFactory) {
        this.originalClass = originalClass;
        this.scopeType = scopeType;
        this.beanFactory = beanFactory;
    }

    public Object getBeanInstance() {
        if (scopeType == Scope.ScopeType.PROTOTYPE) {

        }
        return null;
    }

    protected Object initBean() {

        return null;
    }
}
